<?php
if ($_POST['dod_graf_lek']<>'') $_SESSION['dod_graf_lek']=$_POST['dod_graf_lek'];
$sql="select * from sl_gab_fiz";
$result=mysql_query($sql);
while($row = mysql_fetch_array($result))
{
$list_gab_fiz[$row[0]]=$row[1];
}

echo '<form method="post" action="index.php">';
echo '<input type=SUBMIT align="left" style="width: 100px;height: 22px;background-image: url(./img/red.png); background-repeat: repeat-x; color: #FFFFFF; " value="Powrót" name="grafik">';
echo '</form><br><br>';

?>
<script>
  $(document).ready(function(){
	  $("#fancy").validate();

  });
  

  </script>

<form class="fancy" id="fancy" method="post" action="">
 <fieldset >
   <legend>Dodawanie grafiku</legend>
   <ul>
   <li>
     <label for="cnaz">Data początku*</label>
     <input id="cnaz" name="grafik_dod[d_od]" size="12" class="required" value="<?php echo $_SESSION['data']; ?>" />
   </li>
   <li>
     <label for="cnaz">Data końca*</label>
     <input id="cnaz" name="grafik_dod[d_do]" size="12" class="required" value="<?php echo date("Y-m-d", strtotime($_SESSION['data'])+2592000); ?>" />
   </li>
   
   <li>
     <label for="cpesel">Godzina początku</label>
     <input id="cpesel" name="grafik_dod[g_od]" id="pac_pesel" size="6" maxlength="8" class="required" value="15:00" />
   </li>
   <li>
     <label for="cpesel">Godzina końca</label>
     <input id="cpesel" name="grafik_dod[g_do]" id="pac_pesel" size="6" maxlength="8"  class="required" value="19:00" />
   </li>
   <li>
     <label for="cpesel">Czas na wizytę</label>
     <input id="cpesel" name="grafik_dod[interwal]" id="pac_pesel" size="6" maxlength="8"  class="required" value="00:20"  />
   </li>
   <li>
     <label for="ckod">Dni tygodnia</label>
     <select name="grafik_dod[dni][]" multiple="multiple" id="grafik_dod[dni][]" size="5">
     <option value="1" selected="selected">Poniedziałek</option>
	<option value="2">Wtorek</option>
	<option value="3">Środa</option>
	<option value="4">Czwartek</option>
	<option value="5">Piątek</option>
	</select>
   </li>
   
   <li>
     <label for="culica">Gabinet</label>
     <select name="grafik_dod[gab]" id="grafik_dod[gab]" size="1">
	<option value="11" selected="selected">Gabinet 1</option>
	<option value="12">Gabinet 2</option>
	<option value="13">Gabinet 3</option>
	<option value="14">Gabinet 4</option>
	</select>
   </li>
   
   
   
   <li>
     <input class="submit" name="grafik_dod_b" type="submit" value="Zapisz"/>
   </li>
   </ul>
 </fieldset>
 </form>









